USE [OHNEW]
GO

/****** Object:  Table [dbo].[S_Table]    Script Date: 11/16/2012 18:01:46 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[S_Table](
	[TableName] [varchar](50) NOT NULL,
	[Title] [varchar](50) NOT NULL,
	[AutoLoad] [int] NOT NULL,
	[Visible] [int] NOT NULL,
	[ParentTableName] [varchar](50) NULL,
	[TableType] [int] NOT NULL,
	[OrderBy] [int] NULL,
	[GroupBy] [int] NULL,
	[HistoryTable] [int] NOT NULL,
 CONSTRAINT [PK_S_Table] PRIMARY KEY CLUSTERED 
(
	[TableName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[S_Table] ADD  CONSTRAINT [DF_S_Table_AutoLoad]  DEFAULT ((1)) FOR [AutoLoad]
GO

ALTER TABLE [dbo].[S_Table] ADD  CONSTRAINT [DF_S_Table_Visible]  DEFAULT ((1)) FOR [Visible]
GO

ALTER TABLE [dbo].[S_Table] ADD  CONSTRAINT [DF_S_Table_TableType]  DEFAULT ((0)) FOR [TableType]
GO

ALTER TABLE [dbo].[S_Table] ADD  CONSTRAINT [DF_S_Table_OrderBy]  DEFAULT ((0)) FOR [OrderBy]
GO

ALTER TABLE [dbo].[S_Table] ADD  CONSTRAINT [DF_S_Table_GroupBy]  DEFAULT ((0)) FOR [GroupBy]
GO

ALTER TABLE [dbo].[S_Table] ADD  DEFAULT ((0)) FOR [HistoryTable]
GO


